package com.ruoyi.kjy.config;/**
 * @InterfaceName: FanoutExchangeDemoConfig
 * @Description:
 * @Author: YourName
 * @Date: 2023-04-19
 */

//import org.springframework.amqp.core.Binding;
//import org.springframework.amqp.core.BindingBuilder;
//import org.springframework.amqp.core.FanoutExchange;
//import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *@InterfaceName: FanoutExchangeDemoConfig
 *@Description:
 *@Author: lilirui
 *@Date: 2023-04-19
 */
@Configuration
public class FanoutExchangeDemoConfig {

    public static final String EXCHANGE_NAME = "mq.fanout";

//    // 声明FanoutExchange交换机
//    @Bean
//    public FanoutExchange fanoutExchange(){
//        return new FanoutExchange(EXCHANGE_NAME);
//    }
//    // 声明第1个队列
//    @Bean
//    public Queue fanoutQueue1(){
//        return new Queue("mq.q1");
//    }
//    //绑定队列1和交换机
//    @Bean
//    public Binding bindingQueue1(Queue fanoutQueue1, FanoutExchange fanoutExchange){
//        return BindingBuilder.bind(fanoutQueue1).to(fanoutExchange);
//    }

}